package com.heima.apis.article.fallback;

import com.heima.apis.article.IArticleClient;
import com.heima.model.article.dtos.ArticleDto;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.common.enums.AppHttpCodeEnum;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * feign失败配置
 * Author: Administrator
 * CreateTime: 2024/9/25
 * Project: heima-leadnews
 */
@Slf4j
@Component
public class IArticleClientFallBack implements IArticleClient {
    @Override
    public ResponseResult saveArticle(ArticleDto dto) {
        log.error("触发IArticleClientFallBack");
        return ResponseResult.errorResult(AppHttpCodeEnum.SERVER_ERROR, "远程调用失败");
    }
}
